Skip to content

Docs: clarify Tailwind CSS v4 PostCSS setup and upgrade notes for Lararvel #2207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

benounnas
Copy link

Many developers — particularly those using Laravel — have faced confusion when upgrading to Tailwind CSS v4, as seen in issue #15735.

The main issue comes from legacy configuration in postcss.config.js that still includes tailwindcss as a plugin. This now causes an error in v4:

"It looks like you're trying to use tailwindcss directly as a PostCSS plugin."

Laravel’s default scaffolding has not yet been updated to reflect the Tailwind CSS v4 setup, which increases the likelihood of this issue occurring during fresh installs or upgrades.

This PR updates the installation section to clarify:

  • tailwindcss, postcss-import, and autoprefixer should be removed from postcss.config.js
  • The Vite plugin now handles these automatically
  • References to both Tailwind v3 docs and the official v4 upgrade guide are included for clarity

This clarification should help prevent common setup errors and make the upgrade path smoother for developers working with Laravel or following older guides.

Copy link

vercel bot commented Apr 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tailwindcss-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 15, 2025 7:47am

@philipp-spiess
Copy link
Member

Hey! Thanks for the contribution but I'm not sure if the installation guide is the right place for this. It seems like a new laravel app does not come with a postcss.config.js file so this seems like information that should be on the upgrade guides instead where we do mention the changes to postcss.config.js already.

In my mental model, the installation guides should be for new setups that have not used Tailwind CSS before, that's how all of the guides are written right now. I hope this makes sense!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants